package com.decent.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.decent.entity.Banner;
import com.decent.entity.Image;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author decent
 */
@Mapper
public interface ImageMapper extends BaseMapper<Image> {

    /**
     * 选择轮播图列表
     * @return
     */
    @Select("SELECT title, img_url AS 'bannerUrl' FROM `image` where is_banner = 1")
    List<Banner> selectBannerList();
}